import request from '@/utils/request.js';
import qs from "qs";

/**
 * 邮箱验证码登录【OK】
 * @param {Object} params
 */
export function emailCodeLogin(params) {
	return request({
	    url: "/auth/login/emailCode",
	    method: "post",
	    data:params,
	  });
}

/**
 * 邮箱密码登录【OK】
 * @param {Object} params
 */
export function emailPasswordLogin(params) {
	return request({
	    url: "/auth/login/emailPassword",
	    method: "post",
	    data:params,
	});
}

/**
 * 邮箱注册【OK】
 * @param {Object} params
 */
export function emailRegister(params) {
	return request({
	    url: "/auth/register/email",
	    method: "post",
	    data:params,
	});
}
 
/**
* 找回密码 【OK】
* @param {Object} params
*/
export function resetPassword(params) {
	return request({
		url: "/auth/resetPassword",
		method: "post",
		data:params,
	});
}

/**
 * 找回交易密码
 * @param {Object} params
 */
export function resetTradePassword(params) {
	return request({
	    url: "/auth/resetTradePassword",
	    method: "post",
	    data:params,
	});
}
/**
 * 设置交易密码【OK】
 * @param {Object} params
 */
export function setTradePassword(params) {
	return request({
	    url: "/auth/setTradePassword",
	    method: "post",
	    data:params,
	});
}
/**
 * 修改密码【OK】
 * @param {Object} params
 */
export function updatePassword(params) {
	return request({
	    url: "/auth/updatePassword",
	    method: "post",
	    data:params,
	});
}